/**
 * 
 */
package com.dsteiner.xelavos.client.model;

import java.beans.PropertyChangeListener;
import java.util.List;

import com.dsteiner.widgets.client.PropertyChangeCollection;
import com.dsteiner.widgets.client.domain.ModelObject;

public class MyEntriesModel {
	private PropertyChangeCollection propertyChangeSupport = new PropertyChangeCollection(
			this);

	public void addPropertyChangeListener(String propertyName,
			PropertyChangeListener listener) {
		propertyChangeSupport.registerPropertyChangeListener(propertyName,
				listener);
	}
	private int count;

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		int oldCount = this.count;
		this.count = count;
		propertyChangeSupport.firePropertyChange("count", oldCount, count);
	}
	private int offset;

	public int getOffset() {
		return offset;
	}

	public void setOffset(int offset) {
		int oldOffset = this.offset;
		this.offset = offset;
		propertyChangeSupport.firePropertyChange("offset", oldOffset, offset);
	}
	private int limit;

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		int oldLimit = this.limit;
		this.limit = limit;
		propertyChangeSupport.firePropertyChange("limit", oldLimit, limit);
	}

	private List<ModelObject> modelObjects;

	public List<ModelObject> getModelObjects() {
		return modelObjects;
	}

	public void setModelObjects(List<ModelObject> modelObjects) {
		List<ModelObject> oldModelObjects = this.modelObjects;
		this.modelObjects = modelObjects;
		propertyChangeSupport.firePropertyChange("modelObjects", oldModelObjects, modelObjects);
	}
	private boolean attached;

	public boolean isAttached() {
		return attached;
	}

	public void setAttached(boolean attached) {
		boolean oldAttached = this.attached;
		this.attached = attached;
		propertyChangeSupport.firePropertyChange("attached", oldAttached, attached);
	}
}